<?php
/**
 * @file bg-top-json-procedure.php	Fixed!
 * @version 0.1
 * @desc 输出买入、卖出TOP值, 输出json, (使用MySQl存储过程)
 * 
DELIMITER //
DROP PROCEDURE IF EXISTS bus_top //
CREATE PROCEDURE bus_top()
	SELECT `price`, `num`, `flag` FROM `bus_top` ORDER BY `price` DESC;
 //
DELIMITER ;
 *
 */
$action = $_POST['action'];

if ($action == 'getTop'){

	$msg = '';
	//登录验证
	require_once 'setting.php';
	if (validaStatus4AJAX() == 1){
		$msg = 403;
	}else {
		$top = Appleseed::getTop10();
	}
	
	$result = array('top' => $top,
					'msg' => $msg );
	echo json_encode($result);
} //END if getTop
?>